#pragma once

#include <stdio.h>

#define NUM 1024


#define BUF_NULL 0x1
#define BUF_LINE 0x2
#define BUF_ALL  0x3



typedef struct _MY_FILE
{
  int fd;//文件描述符
  char outputbuffer[NUM];//缓冲区
  int current;//数据个数
  int flags;//刷新方式

}MY_FILE;



MY_FILE* my_fopen(const char* path, const char* mode);
size_t my_fwrite(const void* ptr, size_t size, size_t num, MY_FILE* stream);
int my_fclose(MY_FILE* fp);
int my_fflush(MY_FILE* fp);

